const adminreducer = (state = [], action) => {
    switch (action.type) {
        case 'ADMIN_CHECK':
            return action.adminlist
        case 'DEL_ADMIN':
            let arr
            arr = [...state].filter((item) => {
                return item.admin_id != action.index
            })
            return arr
        default:
            return state;
    }
}

export default adminreducer;